package com.hgw.Demo05_FacadePattern.examples;

/**
 * Data time:2021/12/15 11:46
 * StudentID:2019112118
 * Author:hgw
 * Description: 数据加密类，充当子系统类
 */
public class CipherMachine {

    public String encrypt(String plainText) {
        System.out.println("数据加密，将明文转换为密文：");
        String es = "";
        for (int i = 0; i < plainText.length(); i++) {
            String c = String.valueOf(plainText.charAt(i) % 7);
            es += c;
        }
        System.out.println(es);
        return es;
    }
}
